
<style type="text/css">
    <!--
    body {
        font-family: arial;
        font-size: 12px;
        color: white;
        margin-bottom: 25px;
        background-color: black;
        line-height: 1.2;
    }
    -->
</style>
<div style="float:right">
    <table border="1" width="1151">
        <tr>
            <td width="40"><font size="2">ID</td>
            <td width="30"><font size="2">TYP</td>
            <td width="30"><font size="2">Kdo</td>
            <td width="100"><font size="2">IP</td>
            <td width="100"><font size="2">KDY (spuštění) 07.12. 2009</td>
            <td width="50"><font size="2">CPěchy</td>
            <td width="50"><font size="2">CObr</td>
            <td width="50"><font size="2">CTanků</td>
            <td width="50"><font size="2">CStih</td>
            <td width="50"><font size="2">CVrtulí</td>
            <td><font size="2">KPěchy</td>
            <td><font size="2">KObr</td>
            <td><font size="2">KTanků</td>
            <td><font size="2">KStih</td>
            <td><font size="2">Kvrtulí</td>
            <td><font size="2">Útrata</td>
            <td><font size="2">Síla</td>
        </tr>
        <?php
        define("ROWS", 20);
        if (!isset($_GET["celkem"])) {
            $vysledek = mysql_query("select count(*) as pocet from log");
            $zaznam = mysql_fetch_array($vysledek);
            $celkem = $zaznam["pocet"];
        } else {
            $celkem = $_GET["celkem"];
        }
        if ($celkem) {
            if (!isset($_GET["od"]))
                $od = 1; else
                $od=$_GET["od"];

            // vypsání objednávek podle stránkování
            $vysledek = mysql_query("select * from log ORDER BY id DESC" . " limit " . ($od - 1) . ", " . ROWS);
            while ($zaznam = MySQL_Fetch_Array($vysledek)) {
        ?>
                <tr>
                    <td><font size="2"><?php echo $zaznam['id'] ?></td>
                    <td><font size="2"><?php echo $zaznam['typ'] ?></td>
                    <td><font size="2"><?php echo $zaznam['kdo'] ?></td>
                    <td><font size="2"><?php echo $zaznam['ip'] ?></td>
                    <td><font size="2"><?php echo $zaznam['kdy'] ?></td>
                    <td><font size="2"><?php echo $zaznam['cena_pecha'] ?></td>
                    <td><font size="2"><?php echo $zaznam['cena_obr'] ?></td>
                    <td><font size="2"><?php echo $zaznam['cena_tank'] ?></td>
                    <td><font size="2"><?php echo $zaznam['cena_stihy'] ?></td>
                    <td><font size="2"><?php echo $zaznam['cena_vrtule'] ?></td>
                    <td><font size="2"><?php echo $zaznam['kolik_pecha'] ?></td>
                    <td><font size="2"><?php echo $zaznam['kolik_obr'] ?></td>
                    <td><font size="2"><?php echo $zaznam['kolik_tank'] ?></td>
                    <td><font size="2"><?php echo $zaznam['kolik_stihy'] ?></td>
                    <td><font size="2"><?php echo $zaznam['kolik_vrtule'] ?></td>
                    <td><font size="2"><?php echo $zaznam['utrata'] ?></td>
                    <td><font size="2"><?php echo $zaznam['sila'] ?></td>
                </tr>
        <?php } ?>
        </table>
    <?php
            /////////////////////////////////// STRÁNKOVÁNÍ //////////////////////////////
    ?> </table> <?php
            echo "<center><b>";
            echo "Záznamů: " . $od . "-";
            echo (($od + ROWS - 1) <= $celkem) ? ($od + ROWS - 1) : $celkem;
            echo " z celkem $celkem&nbsp;&nbsp;&nbsp;";

            if ($od == 1)
                echo "Začátek&nbsp;|&nbsp;";
            else
                echo "<a href=\"" . $_SERVER["PHP_SELF"] . "?co=administrace&vyber=1&celkem=$celkem&od=1\">Začátek</a>&nbsp;|&nbsp;";

            if ($od < ROWS)
                echo "Předchozí&nbsp;|&nbsp;";
            else
                echo "<a href=\"" . $_SERVER["PHP_SELF"] . "?co=administrace&vyber=1&celkem=$celkem&od=" . ($od - ROWS) . "\">Předchozí</a>&nbsp;|&nbsp;";

            if ($od + ROWS > $celkem)
                echo "Následující&nbsp;|&nbsp;";
            else
                echo "<a href=\"" . $_SERVER["PHP_SELF"] . "?co=administrace&vyber=1&celkem=$celkem&od=" . ($od + ROWS) . "\">Následující</a>&nbsp;|&nbsp;";

            if ($od > $celkem - ROWS)
                echo "Konec&nbsp;<BR>";
            else
                echo "<a href=\"" . $_SERVER["PHP_SELF"] . "?co=administrace&vyber=1&celkem=$celkem&od=" . ($celkem - $celkem % ROWS + 1) . "\">Konec</a><BR>";
        }
        echo "</center></b>\n"; ?>

        </body>

<?php
        if (!isset($_GET["celkem2"])) {
            $vysledek = mysql_query("select count(*) as pocet from ip_cenik");
            $zaznam = mysql_fetch_array($vysledek);
            $celkem2 = $zaznam["pocet"];
        } else {
            $celkem2 = $_GET["celkem2"];
        }
        if ($celkem2) {
            if (!isset($_GET["od"]))
                $od = 1; else
                $od=$_GET["od"];
        }
?>
        <table border="0">
            <tr>
                <td>Počet IP:</td>
                <td><?php echo $celkem2 ?></td>
    </tr>
</table>
</div>